<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/struct_info.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/submitter.js"></script>
<script src="${staticServer}/inc/js/infopad.js?2.2"></script>
<link rel="stylesheet" href="${staticServer}/css/consultant_client.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<script src="${staticServer}/inc/js/datepicker.js"></script>

<script src="${staticServer}/inc/js/htmlfilter.js"></script>
<script src="${staticServer}/inc/js/model_resp.js"></script>
<script src="${staticServer}/inc/js/consultants/consultant_client_quest.js?1.4"></script>
<script src="${staticServer}/js/web/consultant_client_state.js?1.2"></script>
<script src="${staticServer}/js/web/consultant_student_func.js?1.0"></script>
<script src="${staticServer}/js/web/consultant_client_first.js?2.1"></script>
<script src="${staticServer}/js/web/consultant_client_check.js?1.1"></script>


<style>
#SWFUpload_0{
	margin-top: 70px;
    margin-left: -30px;
}
</style>
<script type="text/javascript">
// 定义一个失去焦点的javaScript函数
function inputOnBlur() {
	var nickname = $("#nickname1").val();
	if(nickname==""){
		$(".jd_username1").val("");
		return;
	}
	$.post("${contextPath}/recruitment/getUserByNickname.json", {
		"nickname" : nickname
	}, function(ms) {
		 if(ms.list!=null){
		 	var list = ms.list;
		 	var name = list.name;
		 	var id = list.id;
		 	var objHtml="";
		 	$(".jd_username1").val(name);
		 	$("#recruitment_id").val(name);
	    	objHtml +='<option value="'+list.id+'">'+list.name+'</option>';
	    	$("#recruitment_id").html(objHtml);
		 }
	});
}
</script>
<script>

var add_Period = function(){
	var id = $("#id").val();
	var result = $("#result").val();
	var recruitment_id = $("#recruitment_id").val();
	var detail = $("#detail").val();
	var time = $("#time").val();
	var beizhu = $("#beizhu").val();
	if(result==""){
		infopad.err("请选择老师的面试是否通过");
		return;
	}
	if(recruitment_id==""){
		infopad.err("请选择面试的老师");
		return;
	}
	$.post("${contextPath}/recruitment/addrecruitmentresult.json", {
		    "id":id,
		    "result":result,
		    "recruitment_id":recruitment_id,
		    "time":time,
		    "detail":detail,
            "beizhu":beizhu
		}, function(ms) {
		   var msg = ms.msg;
		   if(msg!=null && msg=="1"){
			   infopad.msg("操作成功！");
			   window.location.href="${contextPath}/recruitment/recruitment_result_list.htm";
		   }else if(msg!=null && msg=="2"){
		       infopad.err("操作失败：不能重复添加");
		       window.location.href="${contextPath}/recruitment/recruitment_result_list.htm";
		   }
			
	});
}

</script>
</head>
<input type="hidden" id="id" value="<#if tgRecruitmentResult??>${tgRecruitmentResult.id}</#if>">
<body>
	<div id="home_link">
		<ul>
			<li></li>
			<li>&gt;</li>
			<li>组织架构</li>
			<li>&gt;</li>
			<li class="current">title</li>
		</ul>
	</div>

	<div id="container">
		<div id="title">添加招聘反馈情况</div>
		<table id="infotable">
		   <tr>
			    <th>面试结果</th>
				<td>
					<select id="result" >
	            		<option value="">请选择</option>
						<option value="1">通过</option>
						<option value="2">待定</option>
						<option value="3">不通过</option>
	            	</select>	
				</td>	
			</tr>
		   
			<tr>
				<th>来面试人的姓名:</th>
				<td>
					<select id="recruitment_id">
					<option value="<#if tgRecruitmentResult??>${tgRecruitmentResult.recruitment_id}</#if>"><#if tgRecruitmentResult??>${tgRecruitmentResult.name}</#if></option>
	            		<#if list??>
	              			<#list list as ls>
	              				<option value="${ls.id}">${ls.name}</option>
	              			</#list>
	            		</#if>
	            	</select>
	            	<input type="text" onblur="inputOnBlur();" id="nickname1" size="15" maxlength="10" placeholder="输入姓名快捷匹配" >	
				</td>
			</tr>
	         
		    <tr>
				<th>面试详情:</th>
				<td>
				    <textarea name="detail" id="detail" rows="5" cols="30" value="<#if tgRecruitmentResult??>${tgRecruitmentResult.details}</#if>"><#if tgRecruitmentResult??>${tgRecruitmentResult.details}</#if></textarea>
				</td>
			</tr>
			<tr>
			 <th>入职日期:(补填的时候需要填写)</th>
				<td>
					<input type="text" id="time" value="" rel="DATE::Y-m-d" value="" size="14" maxlength="15" readonly="readonly" class="DatePicker_Icon">
				</td>
			</tr>
			  <tr>
				<th>备注:</th>
				<td>
				    <textarea name="beizhu" id="beizhu" rows="5" cols="30" value="<#if tgRecruitmentResult??>${tgRecruitmentResult.beizhu}</#if>"><#if tgRecruitmentResult??>${tgRecruitmentResult.beizhu}</#if></textarea>
				</td>
			</tr>
			
		</table>
		
		<div id="controlbar">
			<input type="button" class="submit" onclick="add_Period()" value="  保  存  " />
		</div>
	</div>
	
</body>
</html>